home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 409_01 / svga.h < prev    next >
C/C++ Source or Header  |  1993-10-21  |  3KB  |  87 lines

  1. /****************************************************************************
  2. *
  3. *                            SuperVGA Test Kit
  4. *
  5. *                   Copyright (C) 1993 SciTech Software
  6. *                           All rights reserved.
  7. *
  8. * Filename:     $RCSfile: svga.h $
  9. * Version:      $Revision: 1.2 $
  10. *
  11. * Language:     ANSI C
  12. * Environment:  IBM PC (MS DOS)
  13. *
  14. * Description:  Header file for the small SuperVGA test library.
  15. *               This library provides a simplified interface to SuperVGA
  16. *               cards that have a VESA VBE (or with the Universal VESA
  17. *               VBE installed). This library requires at least a
  18. *               VBE 1.2 interface to function correctly.
  19. *
  20. *               NOTE: This library only works in the large model.
  21. *
  22. * $Id: svga.h 1.2 1993/10/22 08:58:40 kjb release $
  23. *
  24. ****************************************************************************/
  25.  
  26. #ifndef __SVGA_H
  27. #define __SVGA_H
  28.  
  29. #ifndef __DEBUG_H
  30. #include "debug.h"
  31. #endif
  32.  
  33. /*--------------------------- Global Variables ----------------------------*/
  34.  
  35. extern  int     maxx,maxy;          /* Maximum coordinate values        */
  36. extern    long    maxcolor,defcolor;    /* Maximum and default colors        */
  37. extern  int     maxpage;            /* Maximum video page number        */
  38. extern  int     bytesperline;       /* Bytes in a logical scanline      */
  39. extern  bool    twobanks;           /* True if separate banks available */
  40. extern  bool    extendedflipping;   /* True if extended page flipping   */
  41. extern  bool    widedac;            /* True if wide dac is supported    */
  42. extern  int     memory;             /* Memory on board in k             */
  43. extern  short   modeList[];         /* List of available video modes    */
  44. extern  char    OEMString[];        /* OEM string from VBE              */
  45.  
  46. typedef enum {
  47.     memPL       = 3,                /* Planar memory model              */
  48.     memPK       = 4,                /* Packed pixel memory model        */
  49.     memRGB      = 6,                /* Direct color RGB memory model    */
  50.     memYUV      = 7,                /* Direct color YUV memory model    */
  51.     } memModels;
  52.  
  53. /*------------------------- Function Prototypes ---------------------------*/
  54.  
  55. #ifdef  __cplusplus
  56. extern "C" {            /* Use "C" linkage when in C++ mode */
  57. #endif
  58.  
  59. /* In svga.c */
  60.  
  61. int initSuperVGA(void);
  62. bool setSuperVGAMode(int mode);
  63. void restoreMode(void);
  64. bool getSuperVGAModeInfo(int mode,int *xres,int *yres,int *bytesperline,
  65.     int *bitsperpixel,int *memmodel,int *maxpage,long *pagesize);
  66. void setSuperVGADisplayStart(int x,int y);
  67. long rgbColor(uchar r,uchar g,uchar b);
  68. void line(int x1,int y1,int x2,int y2,long color);
  69. void writeText(int x,int y,uchar *str,long color);
  70.  
  71. /* In svga.asm */
  72.  
  73. void setActivePage(int page);
  74. void setVisualPage(int page);
  75. void setBank(int bank);
  76. void setReadBank(int bank);
  77. void *getFontVec(void);
  78.  
  79. extern void (*putPixel)(int x,int y,long color);
  80. extern void (*clear)(void);
  81.  
  82. #ifdef  __cplusplus
  83. }                       /* End of "C" linkage for C++   */
  84. #endif
  85.  
  86. #endif  /* __SVGA_H */
  87.